interface EmptyBoundaryProps {
  isEmpty: boolean
  fallback: React.ReactNode
  children: React.ReactNode
}

const EmptyBoundary: React.FC<EmptyBoundaryProps> = (props) => {
  const { isEmpty, fallback, children } = props

  if (isEmpty) {
    return fallback
  } else {
    return children
  }
}

export default EmptyBoundary
